Skip to main content
GET
Home > Overview payment-recovery card (recovered / retrying / written-off + trailing baseline)

Authorizations

Authorization
string
header
required

Bearer token authentication. Requires a company-admin token whose role holds reports.view. Additionally, the caller's company must have ANALYTICS_DASHBOARD enabled — otherwise every endpoint returns 404.

Query Parameters

country
string

ISO alpha-2 code of one of the requesting company's configured countries (see GET /countries). When present, every service on this endpoint filters its data to that country and reports money in the country's own currency. Omit (or send "all") for the aggregate-across-countries view, which is the default and matches pre-Phase-004 behavior. Unknown ISO codes or ones the company is not configured for return 400.

Example:

"US"

Response

Payment-recovery card payload

Dunning effectiveness for the current calendar month. Amounts are attributed by the failing subscription's current price, one entry per subscription per bucket. Recovery is derived from BillingEvent transitions because subscriptions.last_failed_at clears to NULL on success.

failed_amount
string
required

Decimal amount, expressed as a string to preserve arbitrary precision across the wire. Parsed to Number on the client and formatted with Intl.NumberFormat. Once the in-flight money-cents-migration lands, this will switch to a { amount_cents: integer, currency: string } object.

Example:

"180.25"

failed_count
integer
required
Required range: x >= 0
recovered_amount
string
required

Decimal amount, expressed as a string to preserve arbitrary precision across the wire. Parsed to Number on the client and formatted with Intl.NumberFormat. Once the in-flight money-cents-migration lands, this will switch to a { amount_cents: integer, currency: string } object.

Example:

"180.25"

recovered_count
integer
required
Required range: x >= 0
retrying_amount
string
required

Decimal amount, expressed as a string to preserve arbitrary precision across the wire. Parsed to Number on the client and formatted with Intl.NumberFormat. Once the in-flight money-cents-migration lands, this will switch to a { amount_cents: integer, currency: string } object.

Example:

"180.25"

retrying_count
integer
required
Required range: x >= 0
written_off_amount
string
required

Decimal amount, expressed as a string to preserve arbitrary precision across the wire. Parsed to Number on the client and formatted with Intl.NumberFormat. Once the in-flight money-cents-migration lands, this will switch to a { amount_cents: integer, currency: string } object.

Example:

"180.25"

written_off_count
integer
required
Required range: x >= 0
won_back_pct
string
required

A percentage share, expressed as a decimal string rounded to one decimal place. "100.0" when a single bucket accounts for the full total; "0.0" when the divisor was zero.

Example:

"42.5"

baseline_won_back_pct
string
required

A percentage share, expressed as a decimal string rounded to one decimal place. "100.0" when a single bucket accounts for the full total; "0.0" when the divisor was zero.

Example:

"42.5"

top_retrying_reasons
string[]
required

Up to two human-readable category labels describing the dominant failure reasons among the retrying subscriptions (e.g. "insufficient funds", "expired cards"). Empty when nothing is retrying or no reasons categorised.

Maximum array length: 2
currency
string
required

ISO 4217 three-letter code (uppercase).

Required string length: 3
Example:

"USD"

meta
object